package com.rightsidetech.mall.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class CommoditySaveSpecsReq extends DetailSpecsReq implements Serializable {

    @ApiModelProperty(value = "商品价格",required = true)
    @NotNull(message = "商品价格不可为空")
    @Range(min = 0,max = 999999999999L,message = "商品价格超出最大范围、或不能为负数")
    private BigDecimal price;

    @ApiModelProperty("以旧换新价格")
    @Range(min = 0,max = 999999999999L,message = "商品以旧换新价格超出最大范围、或不能为负数")
    private BigDecimal inNewPrice;

    @ApiModelProperty(value = "图片",required = true)
    @NotBlank(message = "规格图片不允许为空")
    private String picture;
}
